﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Network.Utility;

public static class TimeUtility
{
    public static long GetMilliSecondTimeStamp()
    {
        var timeStr = DateTime.Now.ToString("yyyyMMddHHmmssfff");
        return Convert.ToInt64(timeStr);
    }
    public static string GetDate()
    {
        return DateTime.Now.ToString("yyyyMMdd");
    }
    public static string GetTime()
    {
        return DateTime.Now.ToString("HH:mm:ss");
    }
    public static string GetDateTime()
    {
        return DateTime.Now.ToString("yyyyMMdd-HH:mm:ss");
    }
}
